<?php
class CommandRunner {
	public function run(){
		if ( isset($_POST['command']) ){
			$command = new XString($_POST['command']);
			$handler = 'C'.ucfirst(strtolower($command->shiftAWord()));
			$argString = $command->value;
			
			X::import('Application.CommandRunner.'.$handler.'.'.$handler);
			$action = new $handler();
			$action->parserParamString($argString);
			$action->run()->show();
		}
		echo ' 
<form action="index.php" target="_self" method="POST">
	<input name="command" type="text" style="width:50%" />
	<input type="submit" name="run" value="run" />
</form>';
	}
}
?>